
$(document).ready(function() {    
    $("#tags-places").tokenInput( [
    <c:forEach items="${model.places}" var="place">
        {id: "<c:out value="${place.id}"/>", name: "<c:out value="${place.title}"/>"},
    </c:forEach>
        {id: 0, name: ""}
    ], {
        theme: "facebook",
        preventDuplicates: true
    }
);   
$("#tags-amenities").tokenInput( [
    <c:forEach items="${model.amenities}" var="amenity">
        {id: "<c:out value="${amenity.id}"/>", name: "<c:out value="${amenity.title}"/>"},
    </c:forEach>
        {id: 0, name: ""}
    ], {
        theme: "facebook",
        preventDuplicates: true
    }
);    
